Skip to content

Conversation

@edmundmiller
Copy link
Member

@edmundmiller edmundmiller commented Oct 24, 2025

Summary

Per-task Fusion control via disk fusion: true/false - a clearer alternative to scratch false.

Behavior Matrix

scratch disk.fusion fusion.enabled Result Warning
true true any scratch ⚠️ YES
false true any fusion NO
true false any scratch NO
true null true scratch ⚠️ YES
null true any fusion NO
null false any local NO

Precedence: scratch=true > disk.fusion > fusion.enabled

Syntax

process myTask {
    disk fusion: false  // Disable Fusion for this task
    disk request: '100 GB', fusion: true  // With disk size
    disk request: '375 GB', type: 'local-ssd', fusion: false  // With GCP disk type
}

Notes

  • ✅ Backward compatible - scratch false still works
  • ⚠️ AWS Batch: Only disk.fusion works (disk.type/request ignored - existing behavior)

@edmundmiller edmundmiller self-assigned this Oct 24, 2025
@netlify
Copy link

netlify bot commented Oct 24, 2025

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit cd122f4
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/68fb3f3131011600082ce259

Add optional Boolean fusion field to DiskResource to allow per-task
control of Fusion filesystem usage.

Changes:
- Add fusion field to DiskResource class
- Update constructor to accept fusion parameter from disk directive
- Make request field optional (can be null) for fusion-only usage
- Update withRequest() to preserve fusion setting
- Update toString() via @tostring to include fusion field

This enables syntax like:
  disk fusion: false
  disk request: '100 GB', fusion: true

Signed-off-by: Edmund Miller <[email protected]>
Enable per-task control of Fusion filesystem by checking the disk.fusion
setting before falling back to executor-level configuration.

Changes:
- Modify fusionEnabled() in FusionAwareTask to check task's disk.fusion
  setting first
- Fall back to executor.isFusionEnabled() if disk.fusion is not specified
- Task-level setting takes priority over global fusion.enabled config
- Add null-safe navigation for config to handle cases where task config
  may not be set (e.g., in test mocks)

Priority order:
1. Task-level disk.fusion setting (highest)
2. Executor/session-level fusion.enabled config (fallback)

This provides a clearer alternative to using "scratch false" for
disabling Fusion on problematic tasks.

Signed-off-by: Edmund Miller <[email protected]>
Add comprehensive unit tests for the disk fusion feature.

Changes:
- Add test cases for DiskResource with fusion field
- Test all combinations: fusion true/false/null
- Test fusion field preservation in withRequest()
- Test combined usage with type and request fields

Tests verify:
- DiskResource correctly stores fusion setting
- Fusion setting persists through withRequest() transformations
- All disk directive syntax variants parse correctly

Signed-off-by: Edmund Miller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants